package com.example.druid.demo_druid.mapper;

import com.example.druid.demo_druid.enums.DatabaseType;
import com.example.druid.demo_druid.interceptor.DataSource;
import com.example.druid.demo_druid.model.Classes;
import com.example.druid.demo_druid.util.MyMapper;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * @author devsun
 * Created by on 2017/12/10.
 */
@Mapper
public interface ClassMapper extends MyMapper<Classes> {

    @Select("SELECT * FROM classes")
    List<Map<String,Object>> findClassList();

    @Insert("INSERT INTO classes (class_name) VALUES('123123123')")
    Integer insertClass();
}
